package cn.ztydata.teachingsystem.heaven.web.dto;

import org.hibernate.validator.constraints.Length;
import org.hibernate.validator.constraints.Range;

import javax.validation.constraints.DecimalMin;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotNull;
import java.sql.Date;

/**
 * 课程Dto类
 * Created by chenxin on 2014/12/11.
 */
public class CourseDto {
    private Long id = Long.valueOf(0); //ID

    @NotNull
    @Length(min = 1, max = 60, message = "中文名称长度应为1~60")
    private String name; //中文名称
    @Length(max = 60, message = "英文名称长度不能超过60")
    private String enName; //英文名称
    @NotNull
    @Min(value = 1, message = "系部ID不合法")
    private Long collegeId; //系部ID
    @NotNull
    @Min(value = 1, message = "专业ID不合法")
    private Long majorId; //专业ID
    @NotNull
    @Range(min = 1, max = 4, message = "课程类型不合法")
    private Integer type; //课程类型
    @NotNull
    @Range(min = 1, max = 2, message = "课程种类不合法")
    private Integer kind; //课程种类
    @NotNull
    @Range(min = 1, max = 2, message = "课程性质不合法")
    private Integer property; //课程性质
    @NotNull
    @Range(min = 0, max = 1, message = "校级开放课标识不合法")
    private Integer open; //是否为开放课
    @NotNull
    @Range(min = 0, max = 1, message = "核心课标识不合法")
    private Integer core; //是否为核心课
    @NotNull
    @DecimalMin(value = "0.0", message = "学分最小为0.0")
    private Double grade; //学分
    @NotNull
    @Min(value = 1, message = "理论学时最小为1")
    private Integer theoryTime; //理论学时
    @NotNull
    @Min(value = 1, message = "实践学时最小为1")
    private Integer practiceTime; //实践学时
    @Length(max = 250, message = "备注内容不能超过250个字符")
    private String remark; //备注

    private int status;//课程状态

    private Date setTime; //创建时间
    private String oneLevelName; //一级结构名称
    private String twoLevelName; //二级结构名称
    private String photo; //课程封面

    private String collegeName; //院系名称
    private String majorName; //专业名称

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getEnName() {
        return enName;
    }

    public void setEnName(String enName) {
        this.enName = enName;
    }

    public Long getCollegeId() {
        return collegeId;
    }

    public void setCollegeId(Long collegeId) {
        this.collegeId = collegeId;
    }

    public Long getMajorId() {
        return majorId;
    }

    public void setMajorId(Long majorId) {
        this.majorId = majorId;
    }

    public Integer getKind() {
        return kind;
    }

    public void setKind(Integer kind) {
        this.kind = kind;
    }

    public Integer getProperty() {
        return property;
    }

    public void setProperty(Integer property) {
        this.property = property;
    }

    public Integer getOpen() {
        return open;
    }

    public void setOpen(Integer open) {
        this.open = open;
    }

    public Integer getCore() {
        return core;
    }

    public void setCore(Integer core) {
        this.core = core;
    }

    public Double getGrade() {
        return grade;
    }

    public void setGrade(Double grade) {
        this.grade = grade;
    }

    public Integer getTheoryTime() {
        return theoryTime;
    }

    public void setTheoryTime(Integer theoryTime) {
        this.theoryTime = theoryTime;
    }

    public Integer getPracticeTime() {
        return practiceTime;
    }

    public void setPracticeTime(Integer practiceTime) {
        this.practiceTime = practiceTime;
    }

    public String getOneLevelName() {
        return oneLevelName;
    }

    public void setOneLevelName(String oneLevelName) {
        this.oneLevelName = oneLevelName;
    }

    public String getTwoLevelName() {
        return twoLevelName;
    }

    public void setTwoLevelName(String twoLevelName) {
        this.twoLevelName = twoLevelName;
    }

    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

    public Integer getType() {
        return type;
    }

    public void setType(Integer type) {
        this.type = type;
    }

    public String getCollegeName() {
        return collegeName;
    }

    public void setCollegeName(String collegeName) {
        this.collegeName = collegeName;
    }

    public String getMajorName() {
        return majorName;
    }

    public void setMajorName(String majorName) {
        this.majorName = majorName;
    }

    public String getPhoto() {
        return photo;
    }

    public void setPhoto(String photo) {
        this.photo = photo;
    }

    public Date getSetTime() {
        return setTime;
    }

    public void setSetTime(Date setTime) {
        this.setTime = setTime;
    }

    public  int getStatus(){
        return status;
    }

    public void setStatus(int status){
        this.status = status;
    }
}
